%==========================================================================
                        %Inicialize 
%==========================================================================
disp(' Data Set:')
disp('     1  - City/Highway Combined 18K (recommended)')
disp('     2  - City/Highway Combined 25K (recommended)')
disp('     3  - City/Highway Combined 32K (recommended)')
disp('     4  - City 18K')
disp('     5  - City 25K')
disp('     6  - City 32K')
disp('     7  - Highway 18K')
disp('     8  - Highway 25K_1')
disp('     9  - Highway 25K_2')
disp('     10 - Highway 32K')
disp('     11 - Constant Speed 18K')
disp('     12 - Constant Speed 25K')
disp('     13 - Constant Speed 32K')
Data_set = input('Which data set to analyze? \n  (Enter a number from 1 to 13 and Press ENTER) ');
%Data_set=1;
assert((Data_set >= 1)&&(Data_set<=13), 'Enter a number from 1 to 13') % asserttion
switch Data_set
            % city highway combined
    case 1
        load data/cycle_combined_18k;
    case 2
        load data/cycle_combined_25k;
    case 3
        load data/cycle_combined_32k;
            
           % city
    case 4
        load data/cycle_city_18k1;
    case 5
        load data/cycle_city_25k0;
    case 6
        load data/cycle_city_32k1;
           
           % highway
    case 7
        load data/cycle_highway_18k0;
    case 8
        load data/cycle_highway_25k1;
    case 9
        load data/cycle_highway_25k2;
    case 10
        load data/cycle_highway_32k0;
        
          % constant speed
    case 11
        load data/cycle_constantspeed_18k2;
    case 12
        load data/cycle_constantspeed_25k0;
    case 13
        load data/cycle_constantspeed_30k0;
end

data=[Time,Speedmph,amsVehicleAccel,Engine_Speed,Net_Teng,pcGradeFinal,SBS_Active,amsLateralAccelFilt]; % new data set

 %Vehcile Mass     
  if (Data_set==1)||(Data_set==4)||(Data_set==7)||(Data_set==11)
        mass = 8078;
    else if (Data_set==2)||(Data_set==5)||(Data_set==8)||(Data_set==9)||(Data_set==12)
            mass = 11317;
        else if (Data_set==3)||(Data_set==6)||(Data_set==10)||(Data_set==13)
               mass = 13598;
            end
        end
  end
  
  fprintf('Vehicle mass: %5.0f kg \n',mass)

    
 